<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>
		<p:dialog header="Purchase Requisition Detail" widgetVar="itemDialog"
			modal="true" showEffect="fade" hideEffect="fade" resizable="false">
			<p:outputPanel id="itemDetail" style="text-align:center;">
				<p:panelGrid columns="2"
					rendered="#{not empty backingBean.selectedItem}"
					columnClasses="label,value">

					<h:outputLabel value="Department/Project" />
					<h:outputText
						value="#{backingBean.selectedItem.project.description}" />

					<h:outputLabel value="Description" />
					<h:outputText
						value="#{backingBean.selectedItem.description}" />

					<h:outputLabel value="Requisition Date" />
					<h:outputText
						value="#{backingBean.selectedItem.requisitionDate}">
						<f:convertDateTime pattern="MM/dd/yyyy h:mm a" />
					</h:outputText>

					<h:outputLabel value="Status" />
					<h:outputText
						value="#{backingBean.selectedItem.status}" />

				</p:panelGrid>

				<br />

				<p:commandButton value="Open" ajax="false"
					action="#{backingBean.edit}">
					<f:param name="prId"
						value="#{backingBean.selectedItem.id}" />
					<f:param name="outcome"
						value="#{outcome}" />
				</p:commandButton>
			</p:outputPanel>
		</p:dialog>
	</ui:composition>
</body>
</html>